<?php

class Application_Model_DbTable_Ciudad extends Zend_Db_Table_Abstract
{

    protected $_name = 'ciudad';

    public function getAsKeyValue($idZona){
	    $select = $this->select()
	    		->where('idZona = ?', $idZona);

	    $rowset = $this->fetchAll($select);
	    $data = array();

      	foreach($rowset as $row){
    		$data[$row->id] = $row->nombre;
    	}
	    return $data;
	}

   	public function getAsKeyValueJSON($idZona){
    	$select = $this->select()
				->where('idZona = ?', $idZona);
    	$rowset = $this->fetchAll($select)->toArray();
    	return $rowset;
   	}



}

